<template>
  <div class="index">
      <!-- 大轮播 -->
      <maxSwiper :message='maxSwiper'/>
      <!-- 导肮列表 -->
      <TabList :message='tabList'/>
      <footNavTwo/>
  </div>
</template>
<script>
import api from '../../api/api.js'
import wx from 'weixin-js-sdk'
import footNavTwo from '@/components/footNavTwo'
import maxSwiper from './components/maxSwiper'
import TabList from './components/tabList'
import { Dialog,Field,Skeleton,Lazyload } from 'vant';
import { setTimeout } from 'timers';
export default {
  data () {
    return {
      showConfirm:false,
      infomobile: '',
      mobile: '',
      weather: {},
      ip: '',
      getcity: '',
      listData:[],
      itemData:[],
      defaults:'',
      maxSwiper : [],
      loading: true,
      tabList : [
        {
          path:'https://u1qa5f.smartapps.cn/pages/epidemic/index',
          imgSrc:require("@/assets/images/ride.png"),
          Text: '同乘查询'
        },
        {
          path:'https://expert.baidu.com/med/template/#/pages/act/covid19-pcr/index?sf_ref=search_feiyan&lid=5188135290',
          imgSrc:require("@/assets/images/ambitus.png"),
          Text: '核酸检测'
        },
        {
          path:'https://expert.baidu.com/med/template/#/pages/wz/antiepidemicpage/index?pd=med&openapi=1&from_sf=1&resource_id=5216&vn=med&atn=antiepidemicpage&sf_ref=search_feiyanditu_antiepidemic&lid=14901404375794124016&referlid=14901404375794124016',
          imgSrc:require("@/assets/images/expert.png"),
          Text: '专家义诊'
        },
        {
          path:'https://expert.baidu.com/med/template/#/pages/doctor/fyrobottriage/index?vn=med&word=%E9%97%AE%E5%8C%BB%E7%94%9F&atn=fyrobottriage&title=%E6%99%BA%E8%83%BD%E8%87%AA%E6%B5%8B&questionnaire=antiepidemic&sf_ref=feed_jingxuan_antiepidemic_zice&lid=8620714958',
          imgSrc:require("@/assets/images/fever.png"),
          Text: '发热自查'
        },
        {
          path:'https://xue.baidu.com/okam/pages/saasyunying/index?sa=39259&source=39259&bkExt=%7B%22sid%22%3A%22138199_100805_128064_135846_141000_125580_139148_138657_140142_133994_138878_137985_141200_140173_131246_132551_137749_138165_107316_138883_140260_141753_140201_140592_138585_141651_138253_140113_136196_131862_141742_140324_140579_133847_140793_140065_134047_131423_140311_140797_136537_136751_110085_127969_140271_140593_140865_139885_140994_138426_138942_141191_140596%22%2C%22qid%22%3A%228828645649456448882%22%2C%22bkFrom%22%3A%22epidemic_operation%22%7D&appKey=Tv397hxPNa5PYBBAHds139ymOm3v2nsQ_ext04',
          imgSrc:require("@/assets/images/curriculum.png"),
          Text: '免费好课'
        },
        {
          path:'https://m.baidu.com/s?word=%E7%A5%9D%E7%A6%8F%E6%AD%A6%E6%B1%89',
          imgSrc:require("@/assets/images/blessing.png"),
          Text: '祝福武汉'
        },
        {
          path:'https://expert.baidu.com/med/template/#/pages/speTopic/activity/index?lid=1410564905',
          imgSrc:require("@/assets/images/manual.png"),
          Text: '预防手册'
        },
      ],
    }
  },
  created() {
    this.Advertisement()
    this.menu()
  },
  watch:{

  },
  methods: {
    menu(){
      window.scrollTo(0, 0)
    },
    // 顶部轮播
    Advertisement(){
      this.$get(api.Advertisement, {})
      .then((response) => {
        if(response.data.code===1){
          this.maxSwiper = response.data.data
          // this.maxSwiper = response.data.data.reverse()
        }
      })
      .catch((error) => {
        console.log(error);
      });
    },
  },
  components: {
    maxSwiper,
    TabList,
    [Dialog.Component.name]: Dialog.Component,
    [Field.name]:Field,
    footNavTwo
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
.index .van-field__body input{
  color: #423f72;
  caret-color:#423f72;
}
.index .van-cell{
  line-height: .15rem
}
.index .van-field__body{
  width: 88%;
  margin: .1rem auto;
  border: 1px solid #423f72;
  padding: 0.08rem 0;
  border-radius: .1rem;
}
.index .van-dialog{
  color: #423f72;
  width: 70%;
  top: 35%;
  font-weight: bold;
}
.index .van-button--large{
  height: 40px;
  line-height: 40px;
  margin-top: .1rem;
}
</style>

<style scoped>
.index{
  overflow: hidden;
}
.index .van-cell{
  padding: 0 .8rem;
}
.tipsText{
  text-align: center;
  font-size: .28rem;
}
.tipsText:nth-of-type(1){
  margin-top: .30rem;
}
</style>
